//
// Created by Administrator on 2020/10/28.
//

#include <stdio.h>
#include <iostream>
#include "../lib/doctest.h"
#include "../../include/utils/objArc.h"

using namespace std;

TEST_SUITE ("REF_COUNTER_TS")
{
    TEST_CASE ("REF_COUNTER_TC")
    {
        S_ObjArc objArc;

        SUBCASE("REF_COUNTER_SC_BASE")
        {
            OARC_Init(&objArc, 2);
            REQUIRE(2 == OARC_GetCount(&objArc));
            OARC_DecCount(&objArc);
            OARC_DecCount(&objArc);
            REQUIRE(0 == OARC_GetCount(&objArc));
            OARC_IncCount(&objArc);
            REQUIRE(1 == OARC_GetCount(&objArc));
        }
    }
}

